package com.ocl.www.utils;

import com.ocl.www.controller.LoginController;
import com.ocl.www.domain.User;
import com.ocl.www.service.UserService;
import org.apache.log4j.Logger;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/**
 * Created by Administrator on 2016/11/23.
 */
public class UserUntil {

    private static Logger log = Logger.getLogger(UserUntil.class);



    public static Integer getUserId(Set<?> s){


        Object[] obj = new Object[2];
        int obji = 0;
        Iterator<?> it = s.iterator();
        while(it.hasNext()){
            obj[obji] = it.next();
            log.info(obj.getClass());
            log.info(obj.toString());
            obji++;
        }
        Map<String,String> map1 = (Map<String, String>) obj[1];

        return Integer.valueOf(map1.get("userId"));
    }
}
